﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class ConsumiendoWCF : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
       
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        
       if (rdlist.SelectedIndex==0 )  
       
       {

           
        wcfbodega.Service1Client   we = new wcfbodega.Service1Client();
        DataSet ds = new DataSet();
        GridView1.DataSource = we.Producto((int.Parse(this.TextBox1.Text)));     
        GridView1.DataBind();
       }

        {
        
       if (rdlist.SelectedIndex==1 )  
          {
        
        wcfbodega.Service1Client   we1 = new wcfbodega.Service1Client();
        DataSet ds = new DataSet();
        GridView1.DataSource = we1.GetProductos();  
        GridView1.DataBind();
       }
       if (rdlist.SelectedIndex==2)
       {
           wcfbodega.Service1Client we2 = new wcfbodega.Service1Client();
           DataSet  ds = new DataSet();
           GridView1.DataSource = we2.GetBdCarnes();
           GridView1.DataBind();   
          
       }
       if (rdlist.SelectedIndex == 3)
       {
           wcfbodega.Service1Client we2 = new wcfbodega.Service1Client();
           DataSet ds = new DataSet();
           GridView1.DataSource = we2.GetFrutas();  
           GridView1.DataBind();

       }


       if (rdlist.SelectedIndex == 4)
       {
           wcfbodega.Service1Client we2 = new wcfbodega.Service1Client();
           DataSet ds = new DataSet();

           GridView1.DataSource = we2.GetLateos();
           GridView1.DataBind();

       }



        }
        
    }

    protected void rdlist_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
    protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
    {

    }
}

   
